#ifndef OSGArrowAnimation_H
#define OSGArrowAnimation_H

#include <osg/ref_ptr>
#include <osg/MatrixTransform>
#include <map>
#include <osg/StateSet>

#include <OsgExTool/Export>
//导航动画
class OsgExTool_EXPORT OSGArrowAnimation
{
public:
    OSGArrowAnimation();
    ~OSGArrowAnimation(){}

public:

	void createArrowAnimation(std::vector<osg::Vec3f>& points, int num, int speed = 1, double angle = 15, double h = 1.0, double l = 2.0, double div_angle = 0.0, double div_h = 0.0, double div_l = 0.0,osg::Vec4 color = osg::Vec4(1.0, 0.0, 0.0, 1.0));
    osg::ref_ptr<osg::MatrixTransform> createAnimation(std::vector<osg::Vec3f> points, int num, int speed = 1, double angle = 15, double h = 1.0, double l = 2.0, double div_angle = 0.0, double div_h = 0.0, double div_l = 0.0,osg::Vec4 color = osg::Vec4(1.0, 0.0, 0.0, 1.0));

public:

    osg::ref_ptr<osg::Geode> createArrowAnimation(osg::Vec2d point, double angle, double h, double l, osg::Vec4 color, osg::Vec2d trans = osg::Vec2d(0, 0));
    osg::ref_ptr<osg::MatrixTransform> createSquareArrowCallback(std::vector<osg::Vec3f> points, double angle, double h, double l, osg::Vec4 color);

    void initArrowNum(double num);

private:

    int m_pointNum;

    std::vector<osg::Vec3f> m_points;
    std::vector<int> m_arrowNum     ;

	osg::ref_ptr<osg::MatrixTransform> m_pData;
};

#endif


